package com.x.client.model;

import com.x.framework.annotation.MappingColumn;
import com.x.framework.annotation.MappingTable;
import com.x.framework.model.BaseObject;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户卖车
 */
@MappingTable(tableName = "CLIENT_SELL_CAR")
public class SellCar extends BaseObject {

	private static final long serialVersionUID = 1919640468002704595L;

	@MappingColumn(columnName = "SELL_CAR_ID", columnPk = true, columnLength = 32)
	private String sellCarId;// 车辆ID

	@NotNull(message = "首次上牌日期不能为空！")
	@DateTimeFormat(pattern = "yyyy-MM")
	@Past(message = "首次上牌日期必须在当前日期之前！")
	@MappingColumn(columnName = "SELL_CAR_LICENCE_DATE")
	private Date sellCarLicenceDate;// 首次上牌日期

	@NotNull(message = "行驶里程不能为空！")
	@DecimalMax(value = "100.00", message = "行驶里程应该小于100万公里！")
	@DecimalMin(value = "0.0001", message = "行驶里程应该大于0.0001万公里！")
	@MappingColumn(columnName = "SELL_CAR_MILEAGE")
	private BigDecimal sellCarMileage;// 行驶里程

//	@NotNull(message = "车辆图片不能为空！")
//	@Size(max = 255, message = "图片地址应该在255字节以内！")
	@MappingColumn(columnName = "SELL_CAR_IMAGE")
	private String sellCarImage;// 车辆图片

	@NotNull(message = "城市ID不能为空！")
	@MappingColumn(columnName = "CITY_ID")
	private String cityId;// 城市ID

	@NotNull(message = "城市名称不能为空！")
	@MappingColumn(columnName = "CITY_NAME")
	private String cityName;// 城市名称

	@NotNull(message = "品牌ID不能为空！")
	@MappingColumn(columnName = "BRAND_ID")
	private Integer brandId;// 品牌ID

	@NotNull(message = "品牌名称不能为空！")
	@MappingColumn(columnName = "BRAND_NAME")
	private String brandName;// 品牌名称

	@NotNull(message = "车系ID不能为空！")
	@MappingColumn(columnName = "SERIES_ID")
	private Integer seriesId;// 车系ID

	@NotNull(message = "车系名称不能为空！")
	@MappingColumn(columnName = "SERIES_NAME")
	private String seriesName;// 车系名称

//	@NotNull(message = "车型ID不能为空！")
	@MappingColumn(columnName = "MODEL_ID")
	private Integer modelId;// 车型ID

//	@NotNull(message = "车型名称不能为空！")
	@MappingColumn(columnName = "MODEL_NAME")
	private String modelName;// 车型名称

	@NotNull(message = "用户ID不能为空！")
	@MappingColumn(columnName = "USER_ID")
	private String userId;// 用户ID

	@MappingColumn(columnName = "SELL_CAR_STATE")
	private Integer sellCarState;// 状态（1：未处理、2：已处理）

	@MappingColumn(columnName = "SELL_CAR_SOURCE")
	private String sellCarSource;// 卖车线索来源（client：启辕商城）

	@MappingColumn(columnName = "SELL_CAR_CREATE_TIME")
	private Date sellCarCreateTime;// 创建时间

	@MappingColumn(columnName = "SELL_CAR_UPDATE_TIME")
	private Date sellCarUpdateTime;// 修改时间

	@MappingTable(tableName = "CLIENT_USER")
	private User user;

	private Date sellCarLicenceDateStart;// 首次上牌日期开始

	private Date sellCarLicenceDateEnd;// 首次上牌日期结束

	private Date sellCarCreateTimeStart;// 创建时间开始

	private Date sellCarCreateTimeEnd;// 创建时间结束

	private BigDecimal sellCarMileageStart;// 行驶里程开始

	private BigDecimal sellCarMileageEnd;// 行驶里程结束

	public String getSellCarId() {
		return sellCarId;
	}

	public void setSellCarId(String sellCarId) {
		this.sellCarId = sellCarId;
	}

	public Date getSellCarLicenceDate() {
		return sellCarLicenceDate;
	}

	public void setSellCarLicenceDate(Date sellCarLicenceDate) {
		this.sellCarLicenceDate = sellCarLicenceDate;
	}

	public BigDecimal getSellCarMileage() {
		return sellCarMileage;
	}

	public void setSellCarMileage(BigDecimal sellCarMileage) {
		this.sellCarMileage = sellCarMileage;
	}

	public String getSellCarImage() {
		return sellCarImage;
	}

	public void setSellCarImage(String sellCarImage) {
		this.sellCarImage = sellCarImage;
	}

	public String getCityId() {
		return cityId;
	}

	public void setCityId(String cityId) {
		this.cityId = cityId;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public Integer getBrandId() {
		return brandId;
	}

	public void setBrandId(Integer brandId) {
		this.brandId = brandId;
	}

	public String getBrandName() {
		return brandName;
	}

	public void setBrandName(String brandName) {
		this.brandName = brandName;
	}

	public Integer getSeriesId() {
		return seriesId;
	}

	public void setSeriesId(Integer seriesId) {
		this.seriesId = seriesId;
	}

	public String getSeriesName() {
		return seriesName;
	}

	public void setSeriesName(String seriesName) {
		this.seriesName = seriesName;
	}

	public Integer getModelId() {
		return modelId;
	}

	public void setModelId(Integer modelId) {
		this.modelId = modelId;
	}

	public String getModelName() {
		return modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Integer getSellCarState() {
		return sellCarState;
	}

	public void setSellCarState(Integer sellCarState) {
		this.sellCarState = sellCarState;
	}

	public String getSellCarSource() {
		return sellCarSource;
	}

	public void setSellCarSource(String sellCarSource) {
		this.sellCarSource = sellCarSource;
	}

	public Date getSellCarCreateTime() {
		return sellCarCreateTime;
	}

	public void setSellCarCreateTime(Date sellCarCreateTime) {
		this.sellCarCreateTime = sellCarCreateTime;
	}

	public Date getSellCarUpdateTime() {
		return sellCarUpdateTime;
	}

	public void setSellCarUpdateTime(Date sellCarUpdateTime) {
		this.sellCarUpdateTime = sellCarUpdateTime;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Date getSellCarLicenceDateStart() {
		return sellCarLicenceDateStart;
	}

	public void setSellCarLicenceDateStart(Date sellCarLicenceDateStart) {
		this.sellCarLicenceDateStart = sellCarLicenceDateStart;
	}

	public Date getSellCarLicenceDateEnd() {
		return sellCarLicenceDateEnd;
	}

	public void setSellCarLicenceDateEnd(Date sellCarLicenceDateEnd) {
		this.sellCarLicenceDateEnd = sellCarLicenceDateEnd;
	}

	public Date getSellCarCreateTimeStart() {
		return sellCarCreateTimeStart;
	}

	public void setSellCarCreateTimeStart(Date sellCarCreateTimeStart) {
		this.sellCarCreateTimeStart = sellCarCreateTimeStart;
	}

	public Date getSellCarCreateTimeEnd() {
		return sellCarCreateTimeEnd;
	}

	public void setSellCarCreateTimeEnd(Date sellCarCreateTimeEnd) {
		this.sellCarCreateTimeEnd = sellCarCreateTimeEnd;
	}

	public BigDecimal getSellCarMileageStart() {
		return sellCarMileageStart;
	}

	public void setSellCarMileageStart(BigDecimal sellCarMileageStart) {
		this.sellCarMileageStart = sellCarMileageStart;
	}

	public BigDecimal getSellCarMileageEnd() {
		return sellCarMileageEnd;
	}

	public void setSellCarMileageEnd(BigDecimal sellCarMileageEnd) {
		this.sellCarMileageEnd = sellCarMileageEnd;
	}
}